(copyright-update-year): Fix bug: Handle nil copyright-limit.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 17 Aug 2007 21:54:41 +0000 (21:54 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 17 Aug 2007 21:54:41 +0000 (21:54 +0000)
lisp/emacs-lisp/copyright.el

index 5fdebea68f39f6af39d2abf1b325420074a1c051..84f96b12ad5ec4497d777d5bd321279ade51ae30 100644 (file)
@@ -96,7 +96,9 @@ When this is `function', only ask when called non-interactively."
          (re-search-forward (concat "\\(" copyright-regexp
                                     "\\)\\([ \t]*\n\\)?.*\\(?:"
                                     copyright-names-regexp "\\)")
-                            (if copyright-limit (+ (point) copyright-limit))
+                            (if copyright-limit
+                                 (+ (point) copyright-limit)
+                               t)
                             t)
        ;; In case the regexp is rejected.  This is useful because
        ;; copyright-update is typically called from before-save-hook where